<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>确认订单页</title>
    <link rel="stylesheet" href="css/communal.css">
    <link rel="stylesheet" href="css/qrddy.css"/>
    <script src="js/jquery-1.11.0.js"></script>
    <script src="js/communal.js"></script>
    <script src="js/qrddy.js"></script>
    <link rel="stylesheet" href="layui/css/font.css">
    <link rel="stylesheet" href="layui/css/xadmin.css">
    <!--//<link rel="stylesheet"  href="lib/layui/css/layui.css">-->
    <script type="text/javascript" src="jquery-easyui-1.5/jquery.min.js"></script>
    <script type="text/javascript" src="js/md5.min.js"></script>
    <script src="layui/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="layui/js/xadmin.js"></script>
    <script type="text/javascript" src="layui/js/cookie.js"></script>
</head>
<body>
<!-------------------------公共样式A----------------------------->
<!-------------------------主要部分----------------------------->
<div class="banx">
    <div class="banx1">
        <h2>确认订单信息</h2>
        <h3>个人信息</h3>
        <div class="delivery_address">
            <ul>
                <li class="new_address_li">
                    <span>收货人:</span>
                    <input type="text" name="name" th:value="${name}"/>
                </li>

                <li class="new_address_li">
                    <span>性别:</span>
                    <input type="text" name="sex" th:value="${sex}"/>
                </li>
                <li class="new_address_li">
                    <span>年龄:</span>
                    <input type="text" name="age" th:value="${age}"/>
                </li>
                <li class="new_address_li">
                    <span>手机号:</span>
                    <input type="text" name="tel" th:value="${tel}"/>
                    <input type="text" name="doctorName" th:value="${doctorName}" style="display: none"/>
                    <input type="text" name="price" th:value="${price}" style="display: none"/>
                </li>
                <li id="myli" class="new_address_li">
                    <span id="res1" class="layui-icon"
                          style="font-size: 45px; color: #05ff09;display: none">&#xe6af;</span>
                    <span id="res2" class="layui-icon"
                          style="font-size: 45px; color: #FF001F;display: block">&#xe69c;</span>
                    <span id="span_red_button">确认</span>
                </li>
            </ul>
            <h3>结算</h3>
            <div class="delivery_time"></div>

            <div class="foot_right">
                价格：<span th:text="${price}"></span>元
            </div>
            <div class="foot_right">
                +其他费用：0.00元
            </div>
            <div class="foot_right foot_right_big">
                =应付：<span th:text="${price}"></span>元
            </div>
            <div class="foot_right" id="foot_right_red">
                提交订单
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    layui.use('laydate layer', function () {
        var laydate = layui.laydate;
        var layer = layui.layer;
    });

    var isZhen = false;
    $("#span_red_button").click(function () {
        if (isZhen) {
            isZhen = !isZhen;
            $("#res1").css('display', 'none');
            $("#res2").css('display', 'block');
        } else {
            isZhen = !isZhen;
            $("#res2").css('display', 'none');
            $("#res1").css('display', 'block');
        }
    })
    $("#foot_right_red").click(function () {
        if (!isZhen) {
            //示范一个公告层
            layer.open({
                type: 1,
                title: false,//不显示标题栏,
                closeBtn: false,
                area: '300px;',
                shade: 0.4,
                id: 'LAY_layuipro', //设定一个id，防止重复弹出
                btn: ['确认'],
                btnAlign: 'c',
                moveType: 1, //拖拽模式，0或者1
                content: '<div style="padding: 40px; background-color:#525253;color:white;font-size: 15px">' +
                    '请先确认订单的信息是否正确^_^</div>'
            });
        }else {
            var forms = $("input").serialize();
            location.href="/addCar?"+forms;
        }
    })
</script>
</body>
</html>